package tgc.edu.demo.jkxt.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.demo.jkxt.custom.BaseRepository;
import tgc.edu.demo.jkxt.entity.Question;
import tgc.edu.demo.jkxt.entity.Shijuan;
@Repository
public interface ShijuanRepository extends BaseRepository<Shijuan, Integer>{

	@Query(value = "SELECT * FROM question WHERE id = (SELECT question_id FROM shijuan_question WHERE shijuan_id =?)",nativeQuery = true)
	List<Question> findQuestionsByShiJuanId(Integer shijuanid);

}
